local miss1 = fk.CreateSkill{
  name = "miss1",
}

miss1:addEffect(fk.DetermineDamageInflicted, {
  anim_type = "defensive",
  can_trigger = function(self, event, target, player, data)
    return
      target == player and
      player:hasSkill(miss1.name) and
      player:usedSkillTimes(miss1.name) < player.hp
  end,
  on_cost = function (self, event, target, player, data)
    local prompt = "#miss1"
    return player.room:askToSkillInvoke(player, { skill_name = miss1.name, prompt = prompt })
end,
  on_use = function(self, event, target, player, data)
    local room = player.room
        local judge = {
      who = player,
      reason = miss1.name,
      pattern = ".|.|spade,club,heart",
}
    room:judge(judge) 
  if judge.card.suit ~= Card.Diamond then
    data:preventDamage()
  end
end,

Fk:loadTranslationTable{
  ["miss1"] = "闪避",
  [":miss1"] = "每回合限体力值次，当你受到伤害时，你可以判定，若结果不为<font color='red'>♦</font>，防止此伤害。",
  ["#miss1"] = "你可以判定，若结果不为<font color='red'>♦</font>，防止此伤害。",
  ["$miss1"] = "Miss！"
}
})

return miss1